<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">  <!-- 设置thymeleaf的前缀 -->
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    显示信息:<br>
    姓名：<span th:text="${name}"></span><br>
    年龄：<span th:text="${age}"></span>
    <span th:if="${age >= 18}">已成年</span>
    <span th:if="${age < 18}">未成年</span>
    <br>

    <table border="1" cellspacing="0" width="80%">
        <thead><th>编号</th><th>姓名</th><th>电话</th></thead>

        <tbody>
            <tr th:each="obj : ${list}">
                <td th:text="${obj.id}"></td>
                <td th:text="${obj.name}"></td>
                <td th:text="${obj.phone}"></td>
            </tr>
        </tbody>
    </table>
</body>
</html>